]> dgit.raspbian.org Git - libreoffice.git/commitdiff
[PATCH] firebird: call writeFile outside the SAL_WARN_IF condition
authorCaolán McNamara <caolan.mcnamara@collabora.com>
Thu, 30 Jul 2026 13:17:54 +0000 (13:17 +0000)
committerRene Engelhard <rene@debian.org>
Sat, 3 Oct 2026 10:46:08 +0000 (12:46 +0200)
a product build doesn't evaluate the condition, so none of the conf
files were written there.

since:

commit b8407b18adf3c6d552d54d7b6657539e2769afd6
Date:   Tue Jul 28 17:08:38 2026 +0000

    firebird: name the modules of a system firebird by absolute path

and:

commit 6ab71a109bd8a8335208c9faa37a3cfa94523148
Date:   Tue Jul 28 11:05:37 2026 +0000

    Resolves: tdf#172935 Connection from Base to external firebird database refused

Change-Id: I8c66ae59774a161c8c135b2dea772810d92495dd
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Gbp-Pq: Name firebird-call-writeFile-outside-the-SAL_WARN_IF-cond.patch

connectivity/source/drivers/firebird/Driver.cxx

index d8ec8d6202211c07a8afb19b6b36bb23e71fc3db..c8391e0133291435ed690d3f5cb2b2a756f4f34a 100644 (file)
@@ -227,8 +227,8 @@ void writeSystemFirebirdPluginsConf(std::u16string_view rDataDirURL)
 
     const OUString sURL = OUString::Concat(rDataDirURL) + "/" + our_sPluginsConfName;
     const OString sContent = aContent.makeStringAndClear();
-    SAL_WARN_IF(!writeFile(sURL, std::string_view(sContent)), "connectivity.firebird",
-                "could not write " << sURL);
+    const bool bWritten = writeFile(sURL, std::string_view(sContent));
+    SAL_WARN_IF(!bWritten, "connectivity.firebird", "could not write " << sURL);
 }
 
 // Copy the conf files of the international modules into an intl subdirectory of the directory the
@@ -274,8 +274,8 @@ void writeSystemFirebirdIntlConfs(std::u16string_view rDataDirURL)
             continue;
 
         const OUString sURL = sTargetURL + "/" + sName;
-        SAL_WARN_IF(!writeFile(sURL, std::string_view(sContent)), "connectivity.firebird",
-                    "could not write " << sURL);
+        const bool bWritten = writeFile(sURL, std::string_view(sContent));
+        SAL_WARN_IF(!bWritten, "connectivity.firebird", "could not write " << sURL);
     }
 }
 
@@ -430,8 +430,8 @@ void FirebirdDriver::writeExternalDatabaseNames()
     const OString sContent = aContent.makeStringAndClear();
 
     const OUString sURL = m_firebirdDataDirectory.GetURL() + "/" + our_sDatabasesConfName;
-    SAL_WARN_IF(!writeFile(sURL, std::string_view(sContent)), "connectivity.firebird",
-                "could not write " << sURL);
+    const bool bWritten = writeFile(sURL, std::string_view(sContent));
+    SAL_WARN_IF(!bWritten, "connectivity.firebird", "could not write " << sURL);
 }
 
 void FirebirdDriver::disposing()